<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>d1</title>
</head>
<body>
	<iframe src="http://b.com/js/postmessage/d2.html" frameborder="0"></iframe>
	<script type="text/javascript">
		window.onload =function() {
			var iframe = document.getElementsByTagName("iframe")[0];
			var targetOrigin = 'http://b.com';
			iframe.contentWindow.postMessage('hello world', targetOrigin);
		}
	</script>
</body>
</html>